#ifndef BRIDGE_PATTERN_H
#define BRIDGE_PATTERN_H

class DrawAPI
{
public:
    virtual ~DrawAPI() {}
    virtual void drawCircle(int radius, int x, int y) = 0;
};

class RedCircle : public DrawAPI
{
public:
    ~RedCircle() {}
    void drawCircle(int radius, int x, int y) override;
};

class GreenCircle : public DrawAPI
{
public:
    ~GreenCircle() {}
    void drawCircle(int radius, int x, int y) override;
};

class BrShape
{
protected:
    ~BrShape() {
        delete drawAPI;
    }
    BrShape(DrawAPI* drawAPI);

public:
    virtual void draw() = 0;

protected:
    DrawAPI* drawAPI;
};

class BrCircle : public BrShape
{
public:
    ~BrCircle() {}
    BrCircle(int x, int y, int radius, DrawAPI* drawAPI);
    void draw() override;
private:
    int x, y, radius;
};

#endif // BRIDGE_PATTERN_H
